package com.betterjr.modules.application.dubbo;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.betterjr.common.web.AjaxObject;
import com.betterjr.modules.application.IApplicationOperorgService;
import com.betterjr.modules.application.service.ApplicationOperorgService;

@Service(interfaceClass = IApplicationOperorgService.class)
public class ApplicationOperorgDubboService implements IApplicationOperorgService {

    @Autowired
    private ApplicationOperorgService operorgService;

    /**
     * 分配应用给企业
     * <p>Overriding Method of webSaveAssignedApplicationToCust</p>  
     * <p>Description: </p> 
     * @param anApplicationids  应用ids
     * @param anCustNo  企业编号
     * @param anBusinStatus  状态  v状态 1未生效 2已生效 9已失效
     * @return 
     * @see com.betterjr.modules.application.IApplicationOperorgService#webSaveAssignedApplicationToCust(java.lang.String, java.lang.Long, java.lang.String) 
     * @author xuyp
     * @date 2017年11月25日 下午1:37:12
     */
    @Override
    public String webSaveAssignedApplicationToCust(String anApplicationids, Long anCustNo, String anBusinStatus) {

        return AjaxObject
                .newOk("操作成功", operorgService.saveAssignedApplicationToCust(anApplicationids, anCustNo, anBusinStatus))
                .toJson();
    }

    /**
     * 查询应用列表
     * <p>Overriding Method of webQueryApplication</p>  
     * <p>Description: </p> 
     * @param anApplcationTypeId
     * @param anApplcationGroupId
     * @param anBusinStatus
     * @return  应用列表
     * @see com.betterjr.modules.application.IApplicationOperorgService#webQueryApplication(java.lang.Long, java.lang.Long, java.lang.String) 
     * @author xuyp
     * @date 2017年11月25日 下午1:41:10
     */
    @Override
    public String webQueryApplication(Long anApplcationTypeId, Long anApplcationGroupId, String anBusinStatus) {

        return AjaxObject
                .newOk("操作成功", operorgService.queryApplication(anApplcationTypeId, anApplcationGroupId, anBusinStatus))
                .toJson();
    }

}
